#!/usr/bin/env bash

DEFAULT_HOST="https://gitee.com/tj123/common/raw/master"
HOST="http://<%= $host %>"
if [[ "$HOST" =~ ^http:\/\/\<.*\>$ ]];then
  HOST=$DEFAULT_HOST
fi

EXTENSIONS=("aaron-bond.better-comments"
"AdamConn.vscode-lytics"
"adamprzybylski.paradox-syntax"
"adashen.vscode-tomcat"
"AlanWalk.markdown-toc"
"AleksandarDev.vscode-sequence-diagrams"
"alexcvzz.vscode-sqlite"
"bajdzis.vscode-database"
"bierner.markdown-checkbox"
"bierner.markdown-emoji"
"bierner.markdown-mermaid"
"bierner.markdown-preview-github-styles"
"bowlerhatllc.vscode-nextgenas"
"bukas.GBKtoUTF8"
"coolbear.systemd-unit-file"
"csholmq.excel-to-markdown-table"
"darkriszty.markdown-table-prettify"
"DavidAnson.vscode-markdownlint"
"dayemsiddiqui.api-client"
"dgileadi.java-decompiler"
"DigitalBrainstem.javascript-ejs-support"
"DmitryDorofeev.empty-indent"
"donjayamanne.githistory"
"DSnake.java-debug"
"dwarfpenguin.postman-generator"
"EditorConfig.EditorConfig"
"eliostruyf.vscode-spfx-task-runner"
"eridem.vscode-postman"
"fabiospampinato.vscode-diff"
"FallenMax.mithril-emmet"
"formulahendry.docker-explorer"
"formulahendry.docker-extension-pack"
"formulahendry.vscode-mysql"
"foxundermoon.shell-format"
"Futureglobe.sepaswitch"
"GabrielBB.vscode-lombok"
"GEEKiDoS.vdf"
"geeklearningio.graphviz-markdown-preview"
"goessner.mdmath"
"GrapeCity.gc-excelviewer"
"henriiik.docker-linter"
"HookyQR.beautify"
"huizhou.githd"
"humao.rest-client"
"ithildir.java-properties"
"jebbs.markdown-extended"
"jerriepelser.copy-markdown-as-html"
"JoeyYiZhao.mongo-runner"
"josa.markdown-table-formatter"
"k--kato.vscode-backlog-wiki-preview"
"LaurentTreguier.rpm-spec"
"manuth.markdown-converter"
"mdickin.markdown-shortcuts"
"mechatroner.rainbow-csv"
"mhutchie.git-graph"
"mikeburgh.xml-format"
"mkloubert.vs-rest-api"
"MS-CEINTL.vscode-language-pack-zh-hans"
"ms-mssql.mssql"
"ms-python.python"
"ms-vscode.cpptools"
"ms-vscode.csharp"
"ms-vscode.Go"
"ms-vscode.Theme-MarkdownKit"
"msjsdiag.debugger-for-chrome"
"mtxr.sqltools"
"naco-siren.gradle-language"
"necinc.elmmet"
"octref.vetur"
"owenfarrell.vscode-microtask"
"p1c2u.docker-compose"
"PeterJausovec.vscode-docker"
"phacks.isin-code"
"PKief.markdown-checkbox"
"plylrnsdy.run-as"
"pthorsson.vscode-jsp"
"rashwell.tcl"
"redhat.java"
"redhat.vscode-yaml"
"RomanPeshkov.vscode-text-tables"
"ryu1kn.partial-diff"
"sakryukov.markdown-it-plugin-development-framework"
"shanoor.vscode-nginx"
"shardulm94.trailing-spaces"
"shd101wyy.markdown-preview-enhanced"
"shengchen.vscode-checkstyle"
"shuworks.vscode-table-formatter"
"spmeesseman.vscode-taskexplorer"
"sysoev.language-stylus"
"telesoho.vscode-markdown-paste-image"
"thisismanta.stylus-supremacy"
"TomasHubelbauer.vscode-markdown-table-format"
"tomoki1207.pdf"
"TqrHsn.vscode-docker-registry-explorer"
"usernamehw.indent-one-space"
"VisualStudioExptTeam.vscodeintellicode"
"vitorsalgado.vscode-redis"
"vncz.vscode-apielements"
"vscjava.vscode-java-debug"
"vscjava.vscode-java-dependency"
"vscjava.vscode-java-pack"
"vscjava.vscode-java-test"
"vscjava.vscode-maven"
"vscjava.vscode-spring-initializr"
"xyz.local-history"
"ymotongpoo.licenser"
"yzane.markdown-pdf"
"yzhang.markdown-all-in-one"
"Zim.vsc-docker"
"zucska.task-button")

for EXTENSION in ${EXTENSIONS[@]}; do
  code --install-extension "$EXTENSION"
done
